home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 15 / CU Amiga Magazine's Super CD-ROM 15 (1997)(EMAP Images)(GB)[!][issue 1997-10].iso / CUCD / Graphics / Ghostscript / doc / use.txt < prev    next >
Encoding:
Text File  |  1997-07-06  |  48.8 KB  |  1,229 lines

  1.    Copyright (C) 1989, 1995, 1996, 1997 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17.  
  18. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  19.  
  20. This file, use.txt, describes how to use the Ghostscript language
  21. interpreter.
  22.  
  23. For an overview of Ghostscript and a list of the documentation files, see
  24. README.  
  25.  
  26. ********
  27. ******** Installing Ghostscript
  28. ********
  29.  
  30. Please read the documentation file install.txt for information on installing
  31. Ghostscript.
  32.  
  33. ********
  34. ******** Shell scripts for Ghostscript
  35. ********
  36.  
  37. The Ghostscript distribution includes several Unix shell scripts for
  38. driving Ghostscript in different environments.  These are all
  39. user-contributed code: please contact the user identified in the file, not
  40. Aladdin Enterprises, if you have questions.
  41.  
  42. > pv.sh - preview a specified page of a dvi file in an X window.
  43.  
  44. > sysvlp.sh - System V 3.2 lp interface for parallel printer.
  45.  
  46. > pj-gs.sh - printing on an H-P PaintJet under HP-UX.
  47.  
  48. > unix-lpr.sh - queue filter for lpr under Unix.
  49. > lprsetup.sh - setup for unix-lpr.sh.
  50.  
  51. If one of these serves your needs, you may be able to skip most of
  52. the rest of this document.
  53.  
  54. ********
  55. ******** How to use Ghostscript ********
  56. ********
  57.  
  58. To invoke the interpreter, give the command
  59.     gs <filename1> ... <filenameN>
  60. The interpreter will read in the files in sequence (using the method
  61. described under "File searching" below to find the files) and execute them.
  62. After doing this, it reads further input from the primary input stream
  63. (normally the keyboard).  Each line (i.e. characters up to a <return>) is
  64. interpreted separately.  To exit from the interpreter, type quit<return>.
  65. The interpreter also exits gracefully if it encounters end-of-file.  Typing
  66. the interrupt character, e.g., control-C, is also safe.
  67.  
  68. The interpreter recognizes several switches described below, which may appear
  69. anywhere in the command line and apply to all files thereafter.
  70.  
  71. You can get a brief help message by invoking Ghostscript with
  72.     gs -h
  73. or
  74.     gs -?
  75. This message also lists the available devices.  For a little more
  76. information about available devices, a one-line description of each device
  77. appears near the beginning of the file devs.mak.
  78.  
  79. Choosing the output device
  80. --------------------------
  81.  
  82. Ghostscript may be built with multiple output devices.  Ghostscript
  83. normally opens the first one and directs output to it.  To use device xyz
  84. as the initial output device, include the switch
  85.     -sDEVICE=xyz
  86. in the command line.  Note that this switch must precede the first .ps
  87. file, and only its first invocation has any effect.  For example, for
  88. printer output in a normal configuration that includes an Epson printer
  89. driver, you might use the shell command
  90.     gs -sDEVICE=epson myfile.ps
  91. instead of just
  92.     gs myfile.ps
  93. Alternatively, once you are inside Ghostscript, you can type
  94.     (epson) selectdevice
  95.     (myfile.ps) run
  96. All output then goes to the printer instead of the display until further
  97. notice.  You can switch devices at any time by using the selectdevice
  98. procedure, e.g.,
  99.     (vga) selectdevice
  100. or
  101.     (epson) selectdevice
  102. As yet a third alternative, you can define an environment variable
  103. GS_DEVICE as the desired default device name.  The order of precedence for
  104. these alternatives, highest to lowest, is:
  105.     selectdevice
  106.     (command line)
  107.     GS_DEVICE
  108.     (first device in build list)
  109.  
  110. To select the resolution on a printer, use the shell command
  111.     gs -sDEVICE=<device> -r<xres>x<yres>
  112. For example, on a 9-pin Epson-compatible printer, you can get the
  113. lowest-resolution (fastest) mode with
  114.     gs -sDEVICE=epson -r60x72
  115. and the highest-resolution mode with
  116.     gs -sDEVICE=epson -r240x72.
  117. On a 24-pin printer, the lowest resolution is
  118.     gs -sDEVICE=epson -r60x60
  119. and the highest-resolution 24-pin mode is
  120.     gs -sDEVICE=epson -r360x180
  121.  
  122. If you select a printer as the output device, Ghostscript also allows you
  123. to control where the device sends its output.  Normally, output goes
  124. directly to the printer (PRN) on MS-DOS systems, and to a scratch file on
  125. Unix or VMS systems.  To send the output to a series of files foo1.xyz,
  126. foo2.xyz, ..., use the switch
  127.     -sOutputFile=foo%d.xyz
  128. (For compatibility with older versions of Ghostscript, -sOUTPUTFILE=
  129. also works.)  The %d is a printf format specification; you can use
  130. other formats like %02d.  Each file will receive one page of output.
  131. Alternatively, to send the output to a single file foo.xyz, with all
  132. the pages concatenated, use the switch
  133.     -sOutputFile=foo.xyz
  134.  
  135. On Unix systems, you can send the output directly to a pipe.  For
  136. example, to pipe the output to the command `lpr' (which, on many Unix
  137. systems, is the command that spools output for a printer), use the
  138. switch
  139.     -sOutputFile=\|lpr
  140. You can also send output to stdout for piping with the switch
  141.     -sOutputFile=-
  142. In this case you must also use the -q switch, to prevent Ghostscript from
  143. writing messages to stdout.
  144.  
  145. File formats like PCX and PBM are also 'devices'.  When you select a file
  146. format as the 'device', you must also specify an output file, e.g.,
  147.     gs -sDEVICE=pcxmono -sOutputFile=xyz.pcx
  148.  
  149. To find out what devices are available, type
  150.     devicenames ==
  151. after starting up Ghostscript.  Alternatively you can use the -h or
  152. -? switch in the command line, as described above.
  153.  
  154. Choosing paper size
  155. -------------------
  156.  
  157. Ghostscript is normally configured to use U.S. letter paper as the default.
  158. To select a different default paper size, find the line in gs_init.ps that
  159. says
  160.  
  161.     % Optionally choose a default paper size other than U.S. letter.
  162.  
  163. The next line begins
  164.  
  165.     % (a4)
  166.  
  167. To select A4 as the default paper size, remove the % but do not change
  168. anything else.  To select a different default paper size, remove the % and
  169. replace the word a4 with the name of the desired paper size.  You can use
  170. any paper size listed in the table at the beginning of gs_statd.ps.
  171.  
  172. Alternatively, to select a different default paper size for a single
  173. invocation of Ghostscript, you can use the command line switch
  174.     -sPAPERSIZE=a_known_paper_size
  175. e.g.,
  176.     -sPAPERSIZE=a4
  177. or
  178.     -sPAPERSIZE=legal
  179.  
  180. Individual documents also can (and often do) specify a paper size, which
  181. will take precedence over the default one.  If you want to force a specific
  182. paper size, ignoring the paper size specified in the document, make that
  183. paper size the default (as just described), and also include
  184.     -dFIXEDMEDIA
  185. on the command line.
  186.  
  187. Finally, most (but not all) of Ghostscript's printer drivers can be
  188. configured at compile time to use A4 paper as the default by including
  189. -DA4 in the CFLAGS switches in the makefile.  See make.txt for more
  190. details.
  191.  
  192. File searching
  193. --------------
  194.  
  195. When looking for initialization files (gs_*.ps, pdf_*.ps), font files, the
  196. Fontmap file, and files named on the command line, Ghostscript first tests
  197. whether the file name specifies an explicit directory.  The test is as
  198. follows:
  199.  
  200.     - On Unix systems, Ghostscript tests whether the name begins with
  201.     '/', or with one or more '.'s followed by a '/'.
  202.  
  203.     - On MS-DOS or MS Windows systems, Ghostscript tests whether the
  204.     name has a ':' as its second character, or begins with '/' or
  205.     '\', or with one or more '.'s followed by a '/' or '\'.
  206.  
  207.     - On VMS systems, Ghostscript tests whether the name contains a
  208.     node, device, root, or directory specification.
  209.  
  210. If the file name does specify an explicit directory (the test succeeds),
  211. Ghostscript simply tries to open the file using the given name.  Otherwise,
  212. Ghostscript will try directories in the following order:
  213.  
  214.     - The current directory (unless disabled by the -P- switch);
  215.  
  216.     - The directory/ies specified by the -I switch(es) in the command
  217.       line (see below), if any;
  218.  
  219.     - The directory/ies specified by the GS_LIB environment variable,
  220.       if any;
  221.  
  222.     - The directory/ies specified by the GS_LIB_DEFAULT macro in the
  223.       Ghostscript makefile, if any.
  224.  
  225. Each of these (GS_LIB_DEFAULT, GS_LIB, and -I parameter) may be either a
  226. single directory, or a list of directories separated by a character
  227. appropriate for the operating system (':' on Unix systems, ';' on VMS
  228. systems, ';' on MS-DOS systems).  We think that trying the current directory
  229. first is a very bad idea -- it opens serious security loopholes and can lead
  230. to very confusing errors if one has more than one version of Ghostscript in
  231. one's environment -- but when we attempted to change it, users insisted that
  232. we change it back.  You can disable looking in the current directory first
  233. using the -P- switch described below.
  234.  
  235. Note that Ghostscript does not use this file searching algorithm for the
  236. 'run' or 'file' operators: for these operators, it simply opens the file
  237. with the given name.  To run a file using the searching algorithm, use
  238. 'runlibfile' instead of 'run'.
  239.  
  240. Font lookup
  241. -----------
  242.  
  243. Ghostscript has slightly different rules for determining how to find the
  244. file containing a font with a given name.  It starts by looking for Fontmap
  245. files in every directory on the search path: these files provide mappings
  246. between font names and file names.  (See the Fontmap file in the Ghostscript
  247. distribution for details.)  If it can't find a font in any Fontmap file in
  248. the search path (or in the list provided with the -sFONTMAP= switch, if
  249. present), it looks at the GS_FONTPATH environment variable (or the value
  250. provided with the -sFONTPATH= switch, if present), which is also a list of
  251. directories.  It goes to those directories, one by one, and looks for all
  252. files that appear to contain PostScript fonts; it then effectively adds all
  253. those files and fonts to its internal copy of the Fontmap (the catalog of
  254. fonts and the files that contain them).  If you are using one of the
  255. following types of computer, you may wish to set GS_FONTPATH to the
  256. indicated value so that Ghostscript will automatically acquire all the
  257. installed Type 1 fonts:
  258.  
  259.     System type        GS_FONTPATH
  260.     -----------        -----------
  261.     DEC OSF/1        /usr/lib/X11/fonts/Type1Adobe
  262.     DEC Ultrix        /usr/lib/DPS/outline/decwin
  263.     HP-UX 9            /usr/lib/X11/fonts/type1.st/typefaces
  264.     IBM AIX            /usr/lpp/DPS/fonts/outlines
  265.       "            /usr/lpp/X11/lib/X11/fonts/Type1
  266.       "            /usr/lpp/X11/lib/X11/fonts/Type1/DPS
  267.     NeXT            /NextLibrary/Fonts/outline
  268.     SGI IRIX        /usr/lib/DPS/outline/base
  269.       "            /usr/lib/X11/fonts/Type1
  270.     Sun SunOS 4.x        /usr/openwin/lib/X11/fonts/Type1/outline
  271.       " (NeWSprint only)
  272.    newsprint_2.5/SUNWsteNP/reloc/$BASEDIR/NeWSprint/small_openwin/lib/fonts
  273.     Sun Solaris 2        /usr/openwin/lib/X11/fonts/Type1/outline
  274.     VMS            SYS$COMMON:[SYSFONT.XDPS.OUTLINE]
  275.  
  276. These paths may not be exactly right for your installation; if the
  277. indicated directory doesn't contain files whose names are familiar font
  278. names like Courier and Helvetica, you may wish to ask your system
  279. administrator where to find these fonts.
  280.  
  281. NOTE: On Solaris systems simply setting GS_FONTPATH may not work, because
  282. for some reason some versions of Ghostscript can't seem to find any of the
  283. Type1 fonts in /usr/openwin/lib/X11/fonts/Type1/outline.  It says: "15
  284. files, 15 scanned, 0 new fonts".  See Fontmap.Sol instead.
  285.  
  286. Temporary files
  287. ---------------
  288.  
  289. By default, Ghostscript creates temporary files named _temp_XX.XXX in the
  290. current directory on MS-DOS and VMS systems, gsXXXXXX in the current
  291. directory on OS/2 systems, and gs_XXXXX in the /tmp directory on Unix
  292. systems.  You can change the directory in which Ghostscript will create
  293. these files by setting the TEMP environment variable to the name of the
  294. directory.
  295.  
  296. Ghostscript currently doesn't do a very good job of deleting temporary
  297. files when it exits; you may have to delete them manually from time to
  298. time.
  299.  
  300. Environment variable summary
  301. ----------------------------
  302.  
  303. GS_DEVICE
  304.     Defines the default output device.  Described above.
  305.  
  306. GS_FONTPATH
  307.     Specifies a list of directories that should be scanned for fonts
  308. at startup.  Described above.
  309.  
  310. GS_LIB
  311.     Provides a search path for initialization files and fonts.
  312. Described above.
  313.  
  314. GS_OPTIONS
  315.     Defines a list of command line arguments to be processed before
  316. the ones actually specified on the command line.  For example, setting
  317. GS_DEVICE to xxx is equivalent to setting GS_OPTIONS to -sDEVICE=xxx.  The
  318. contents of GS_OPTIONS are not limited to switches; they may include
  319. actual file names or even @file arguments.
  320.  
  321. TEMP
  322.     Defines a directory name for temporary files.  Described above.
  323.  
  324. ********
  325. ******** Using Ghostscript and Ghostview with PDF files
  326. ********
  327.  
  328. Ghostscript is normally configured (except on 16-bit MS-DOS platforms) so
  329. that it can interpret both PostScript and PDF files (the latter are
  330. sometimes incorrectly called "Acrobat files").  It examines each file to
  331. determine automatically whether it is a PDF file or a PostScript file.  All
  332. the normal switches and procedures for interpreting PostScript files also
  333. apply to PDF files, with a few exceptions noted below.  In addition, there
  334. is a shell script
  335.  
  336.         pdf2ps input.pdf output.ps
  337.  
  338. that converts PDF to (Level 2) PostScript.
  339.  
  340. Switches not applicable to PDF files
  341. ------------------------------------
  342.  
  343. You cannot use the `-' switch to provide PDF input from stdin or a pipe.
  344. The PDF language, unlike the PostScript language, inherently requires random
  345. access to the file.
  346.  
  347. Added switches for PDF files
  348. ----------------------------
  349.  
  350.     -dFirstPage=pagenumber
  351.         Starts interpreting on the given page of the document.
  352.  
  353.     -dLastPage=pagenumber
  354.         Stops interpreting after the given page of the document.
  355.  
  356.     -sPSFile=filename
  357.         Writes the PostScript equivalent of the PDF input on the
  358.         given file.
  359.  
  360. Ghostview and PDF files
  361. -----------------------
  362.  
  363. Since Ghostview pipes PostScript files to Ghostscript, you cannot view PDF
  364. files with Ghostview just by saying
  365.         ghostview file.pdf
  366. Instead there are two options:
  367.  
  368.    1. Tanmoy Bhattacharya has written some patches for Ghostview 1.5
  369.    that allow it to read and display PDF files.  These are available
  370.    from:
  371.        ftp://gita.lanl.gov/people/tanmoy/hypertex/gv1.5gs3.33hack.tar.gz
  372.  
  373.    2. Start Ghostview as follows:
  374.           ghostview -arguments file.pdf quit.ps
  375.    This will allow you to display a PDF file, but you won't be able
  376.    to jump to particular pages.  Use Tanmoy's code if you want that
  377.    facility.
  378.  
  379. ********
  380. ******** Notes on specific platforms ********
  381. ********
  382.  
  383. VMS
  384. ---
  385.  
  386. On VMS systems, the last character of each "directory" name indicates what
  387. sort of entity the "directory" references.  If the "directory" name ends
  388. with a colon, it is taken as referring to a logical device, e.g.:
  389.     $ DEFINE GHOSTSCRIPT_DEVICE DUA1:[GHOSTSCRIPT_14]
  390.     $ DEFINE GS_LIB GHOSTSCRIPT_DEVICE:
  391. If the "directory" name ends with a closing square bracket, it is taken as
  392. referring to a real directory, e.g.:
  393.     $ DEFINE GS_LIB DUA1:[GHOSTSCRIPT]
  394.  
  395. In order to specify switches and file names when invoking the interpreter,
  396. define GS as a foreign command:
  397.     $ GS == "$disk:[directory]GS.EXE"
  398. where "disk" and "directory" specify the disk and directory where Ghostscript
  399. is located.  For instance,
  400.     $ GS == "$DUA1:[GHOSTSCRIPT]GS.EXE"
  401. To allow the interpreter to be run from any directory, define the logical
  402. GS_LIB which points to the Ghostscript directory
  403.     $ DEFINE GS_LIB disk:[directory]
  404. This allows Ghostscript to locate its initialization files stored in the
  405. Ghostscript directory -- see use.txt for further details.  Finally, to
  406. invoke the interpreter, merely type GS.  Although DCL normally converts
  407. unquoted parameters to upper case, C programs receive their parameters in
  408. lower case.  That is, the command
  409.     $ GS -Isys$login:
  410. passes the switch "-isys$login" to the interpreter.  To preserve the
  411. case of switches, enclose them in double quotes; e.g.,
  412.     $ GS "-Isys$login:"
  413.  
  414. If you are on an X Windows display (for which gs is built), you can do
  415.  
  416.     $ set display/create/node="domain-name"/transport=tcpip
  417.  
  418. For example,
  419.  
  420.     $ set display/create/node="doof.city.com"/transport=tcpip
  421.  
  422. and then run Ghostscript
  423.  
  424.     $ gs
  425.  
  426. If you write printer output to a file and then want to print the file
  427. later, use the "/PASSALL" qualifier to the PRINT command.
  428.  
  429. In order to get PDF files (or PostScript files that use the setfileposition
  430. operator) to work properly on VMS systems, you must ensure that they are
  431. "stream LF" type files.  (**NOTE**: This only applies if you are using DEC C
  432. to compile Ghostscript; there is no known way to get these files to work
  433. properly with the old VAX C compiler.)  If you transfer files by FTP, you
  434. probably need to do one of the following two things after the transfer:
  435.  
  436. 1. If FTP'd in text/ASCII mode then do:
  437.  
  438.      $ CONVERT/FDL=STREAMLF.FDL input-file output-file
  439.  
  440.    where the contents of the file STREAMLF.FDL are given below.
  441.  
  442. 2. Otherwise, if FTP'd in binary mode do
  443.  
  444.      $ SET FILE/ATTRIBUTE=(RFM:STMLF)
  445.  
  446. The contents of the STREAMLF.FDL file are shown between, and exclusive of, the
  447. dashed lines:
  448.  
  449. -------------------------------------------------
  450. FILE
  451.         ORGANIZATION            sequential
  452.  
  453. RECORD
  454.         BLOCK_SPAN              yes
  455.         CARRIAGE_CONTROL        carriage_return
  456.         FORMAT                  stream_lf
  457. -------------------------------------------------
  458.  
  459. MS-DOS
  460. ------
  461.  
  462. Ghostscript supports many SuperVGA displays directly, most of them with
  463. more than 16 colors.  The complete list is in the file devs.mak, which is
  464. part of the Ghostscript source code.  (If you got Ghostscript under the
  465. Aladdin Ghostscript Free Public License, the person or place from which you
  466. got it is also required to make the source code available to you; if you
  467. got it under the GNU License, see the GNU License for more information.)
  468.  
  469. Some applications, such as Microsoft Word, require a prologue in front of
  470. the PostScript files they output.  In the case of Word, this is one of the
  471. *.ini files included with the Word distribution.  Other applications may
  472. require other prologues.  These may be specified on the Ghostscript
  473. command line, e.g.,
  474.     gs prologue.ini myfile.ps
  475.  
  476. If you have a SuperVGA display that supports a 16-color mode with 800x600
  477. pixels, and you know the display mode number for this mode, you can select
  478. it by using the command line switches
  479.     -sDEVICE=svga16 -dDisplayMode=NNN
  480. where NNN is the display mode number in decimal.  The modes for some
  481. popular display chipsets are as follows:
  482.  
  483.     Acumos AVGA2, AVGA3                         88    (0x58)
  484.     Advance Logic AL2101                        43    (0x2B)
  485.     Ahead V5000                                 113    (0x71)
  486.     ATI VGAWONDER, Graphics Ultra etc.          84    (0x54)
  487.     Chips and Technologies                      106    (0x6A)
  488.     Cirrus Logic CL-GD 500/600                  100    (0x64)
  489.     Cirrus Logic GD 5422                        88    (0x58)
  490.     Compaq VGA                                  89    (0x59)
  491.     CTI                                         106    (0x6A)
  492.   * Genoa 5xxx, Sigma VGA                       41    (0x29)
  493.     Genoa 6xxx                                  106    (0x6A)
  494.     MXIC MX 68010                               85    (0x55)
  495.     NCR 77C22                                   88    (0x58)
  496.     OAK Technologies OTI-067, OTI-077, OTI037C  82    (0x52)
  497.     OAK Technologies OTI037C w/ NEL BIOS        91    (0x5B)
  498.   * Orchid Prodesigner                          41    (0x29)
  499.     Paradise                                    88    (0x58)
  500.     Poach                                       106    (0x6A)
  501.     Primus                                      42    (0x2A)
  502.     Realtek RT 3106                             31    (0x1F)
  503.     Tecmar                                      22    (0x16)
  504.     Trident 8900                                91    (0x5B)
  505.   * Tseng ET-3000, ET-4000                      41    (0x29)
  506.   * VEGA                                        41    (0x29)
  507.     Video 7 SVGA                                98    (0x62)
  508.     WD90C11                                     92    (0x5C)
  509.     Western Digital                             88    (0x58)
  510.  
  511. The ones marked * are the default (they all use the same value.)  If your
  512. card's chipset doesn't appear on this list, or if you try the value here
  513. and it doesn't work, please e-mail the chipset and correct display mode to
  514. ghost@aladdin.com for inclusion in future releases.
  515.  
  516. NOTE: The remainder of the MS-DOS section is currently not relevant, because
  517. the Borland compilers do not support 32-bit MS-DOS executables, and
  518. Ghostscript no longer supports the 16-bit MS-DOS environment.  We have
  519. retained this section on the off-chance that Borland will support 32-bit
  520. MS-DOS compilation at some future time.
  521.  
  522. If you are running Ghostscript on a MS-DOS machine with a display that is
  523. not EGA/VGA compatible, you must use the Borland compiler.  You must build
  524. Ghostscript with the BGI driver as the default, and you will need the
  525. appropriate .BGI file from the Borland Turbo C library.  (Ghostscript
  526. includes the EGA/VGA driver in the executable.)
  527.  
  528. If you are using the BGI driver, two additional environment variables
  529. become relevant:
  530.  
  531.     BGIPATH - defines the directory where Ghostscript will look for
  532. the appropriate BGI driver.  If BGIPATH is not defined, Ghostscript will
  533. look in the directory defined as BGIDIR in the makefile.  In either case,
  534. if no driver is found in the designated directory, Ghostscript will look
  535. in the current directory.
  536.  
  537.     BGIUSER - a string of the form nn.dname, where nn is a hexadecimal
  538. number giving a display mode and dname is the name of a file containing a
  539. user-supplied BGI driver.  If BGIUSER is defined and the BGI device is
  540. selected, Ghostscript will supply nn as the display mode and will obtain
  541. the driver from the file named dname.
  542.  
  543. X Windows
  544. ---------
  545.  
  546. Ghostscript looks for the following resources under the program name
  547. "ghostscript" and class name "Ghostscript":
  548.  
  549.     Name            Class            Default
  550.     ----            -----            -------
  551.     background        Background        white
  552.     foreground        Foreground        black
  553.     borderColor        BorderColor        black
  554.     borderWidth        BorderWidth        1
  555.     geometry        Geometry        NULL
  556.     xResolution        Resolution        **
  557.     yResolution        Resolution        **
  558.     useExternalFonts    UseExternalFonts    true
  559.     useScalableFonts    UseScalableFonts    true
  560.     logExternalFonts    LogExternalFonts    false
  561.     externalFontTolerance    ExternalFontTolerance    10.0
  562.     palette            Palette            Color
  563.     maxGrayRamp        MaxGrayRamp        128
  564.     maxRGBRamp        MaxRGBRamp        5
  565.         maxDynamicColors    MaxDynamicColors    256
  566.     useBackingPixmap    UseBackingPixmap    true
  567.     useXPutImage        UseXPutImage        true
  568.     useXSetTile        UseXSetTile        true
  569.     regularFonts        RegularFonts        see below
  570.     symbolFonts        SymbolFonts        see below
  571.     dingbatFonts        DingbatFonts        see below
  572.  
  573. ** Calculated from display metrics.
  574.  
  575.     Notes on Resources:
  576.  
  577.     Ghostscript doesn't look at the default system background and
  578.     foreground colors; if you want to change the background or
  579.     foreground color, you must set them explicitly for Ghostscript.
  580.     (This is a deliberate choice, so that PostScript documents will
  581.     display correctly -- with white = white and black = black --
  582.     by default, even if text windows use other colors.)
  583.  
  584.     The geometry resource only affects window placement.
  585.  
  586.     Resolution is given in pixels per inch.
  587.  
  588.     The font tolerance gives largest acceptable difference in
  589.     height of the screen font.  The tolerance is expressed as
  590.     a percentage of the height of the desired font.
  591.  
  592.     The palette resource can be used to restrict ghostscript to
  593.     using a grayscale or monochrome palette.
  594.  
  595.     The maxRGBRamp and maxGrayRamp control the maximum number of
  596.     colors that ghostscript allocates ahead of time for the dither
  597.     cube/ramp.  Ghostscript will never preallocate more than half
  598.     of the cells in a colormap.  maxDynamicColors controls the
  599.     maximum number of colors that Ghostscript will allocate
  600.     dynamically in the colormap.
  601.  
  602. The use... resources exist primarily to work around bugs in X servers.  In
  603. particular, many versions of DEC's X server (DECwindows) have bugs that
  604. require setting useXPutImage or useXSetTile to false.
  605.  
  606.     Some servers do not implement backing pixmaps properly, or do not
  607.     have enough memory for them.  If you get strange behavior or "out
  608.     of memory" messages, try setting useBackingPixmap to false.
  609.  
  610.     Some servers do not implement tiling properly.  This will show up
  611.     as broad bands of color where dither patterns should appear.  If
  612.     this happens, try setting useXSetTile to false.
  613.  
  614.     Some servers do not implement bitmap/pixmap displaying properly.
  615.     This may show up as white or black rectangles where characters
  616.     should appear, or characters may appear in "inverse video" (e.g.,
  617.     white on a black rectangle).  If this happens, try setting
  618.     useXPutImage to false.
  619.  
  620. To use native X11 fonts, Ghostscript must map PostScript font names to
  621. the XLFD font names.  The regularFonts, symbolFonts, and dingbatFonts
  622. resources give the name mapping for different encodings.  The XLFD font 
  623. name in the mapping must contain seven dashes.  The X driver adds the
  624. additional size and encoding fields to bring the total number of dashes
  625. in the font name to 14.  Here are the default font mappings:
  626.  
  627.   Regular Fonts: (Fonts available in standard or ISO-Latin-1 encoding)
  628.  
  629.     AvantGarde-Book:-Adobe-ITC Avant Garde Gothic-Book-R-Normal--\n\
  630.     AvantGarde-BookOblique:-Adobe-ITC Avant Garde Gothic-Book-O-Normal--\n\
  631.     AvantGarde-Demi:-Adobe-ITC Avant Garde Gothic-Demi-R-Normal--\n\
  632.     AvantGarde-DemiOblique:-Adobe-ITC Avant Garde Gothic-Demi-O-Normal--\n\
  633.     Bookman-Demi:-Adobe-ITC Bookman-Demi-R-Normal--\n\
  634.     Bookman-DemiItalic:-Adobe-ITC Bookman-Demi-I-Normal--\n\
  635.     Bookman-Light:-Adobe-ITC Bookman-Light-R-Normal--\n\
  636.     Bookman-LightItalic:-Adobe-ITC Bookman-Light-I-Normal--\n\
  637.     Courier:-Adobe-Courier-Medium-R-Normal--\n\
  638.     Courier-Bold:-Adobe-Courier-Bold-R-Normal--\n\
  639.     Courier-BoldOblique:-Adobe-Courier-Bold-O-Normal--\n\
  640.     Courier-Oblique:-Adobe-Courier-Medium-O-Normal--\n\
  641.     Helvetica:-Adobe-Helvetica-Medium-R-Normal--\n\
  642.     Helvetica-Bold:-Adobe-Helvetica-Bold-R-Normal--\n\
  643.     Helvetica-BoldOblique:-Adobe-Helvetica-Bold-O-Normal--\n\
  644.     Helvetica-Narrow:-Adobe-Helvetica-Medium-R-Narrow--\n\
  645.     Helvetica-Narrow-Bold:-Adobe-Helvetica-Bold-R-Narrow--\n\
  646.     Helvetica-Narrow-BoldOblique:-Adobe-Helvetica-Bold-O-Narrow--\n\
  647.     Helvetica-Narrow-Oblique:-Adobe-Helvetica-Medium-O-Narrow--\n\
  648.     Helvetica-Oblique:-Adobe-Helvetica-Medium-O-Normal--\n\
  649.     NewCenturySchlbk-Bold:-Adobe-New Century Schoolbook-Bold-R-Normal--\n\
  650.     NewCenturySchlbk-BoldItalic:-Adobe-New Century Schoolbook-Bold-I-Normal--\n\
  651.     NewCenturySchlbk-Italic:-Adobe-New Century Schoolbook-Medium-I-Normal--\n\
  652.     NewCenturySchlbk-Roman:-Adobe-New Century Schoolbook-Medium-R-Normal--\n\
  653.     Palatino-Bold:-Adobe-Palatino-Bold-R-Normal--\n\
  654.     Palatino-BoldItalic:-Adobe-Palatino-Bold-I-Normal--\n\
  655.     Palatino-Italic:-Adobe-Palatino-Medium-I-Normal--\n\
  656.     Palatino-Roman:-Adobe-Palatino-Medium-R-Normal--\n\
  657.     Times-Bold:-Adobe-Times-Bold-R-Normal--\n\
  658.     Times-BoldItalic:-Adobe-Times-Bold-I-Normal--\n\
  659.     Times-Italic:-Adobe-Times-Medium-I-Normal--\n\
  660.     Times-Roman:-Adobe-Times-Medium-R-Normal--\n\
  661.     ZapfChancery-MediumItalic:-Adobe-ITC Zapf Chancery-Medium-I-Normal--
  662.  
  663.   Symbol Fonts:  (using Symbol encoding)
  664.  
  665.     Symbol: -Adobe-Symbol-Medium-R-Normal--
  666.  
  667.   Dingbat Fonts: (using Dingbat encoding)
  668.  
  669.     ZapfDingbats: -Adobe-ITC Zapf Dingbats-Medium-R-Normal--
  670.  
  671. For X11/NeWS, one can use the OpenWindows scalable fonts instead, which
  672. will give good quality output for any point size.  In this environment,
  673. the relevant section of the resource file should look like this:
  674.  
  675. Ghostscript.regularFonts: \
  676.     AvantGarde-Book:        -itc-avantgarde-book-r-normal-- \n\
  677.     AvantGarde-BookOblique:        -itc-avantgarde-book-o-normal-- \n\
  678.     AvantGarde-Demi:        -itc-avantgarde-demi-r-normal-- \n\
  679.     AvantGarde-DemiOblique:        -itc-avantgarde-demi-o-normal-- \n\
  680.     Bembo:                -monotype-bembo-medium-r-normal-- \n\
  681.     Bembo-Bold:            -monotype-bembo-bold-r-normal-- \n\
  682.     Bembo-BoldItalic:        -monotype-bembo-bold-i-normal-- \n\
  683.     Bembo-Italic:            -monotype-bembo-medium-i-normal-- \n\
  684.     Bookman-Demi:            -itc-bookman-demi-r-normal-- \n\
  685.     Bookman-DemiItalic:        -itc-bookman-demi-i-normal-- \n\
  686.     Bookman-Light:            -itc-bookman-light-r-normal-- \n\
  687.     Bookman-LightItalic:        -itc-bookman-light-i-normal-- \n\
  688.     Courier:            -itc-courier-medium-r-normal-- \n\
  689.     Courier-Bold:            -itc-courier-bold-r-normal-- \n\
  690.     Courier-BoldOblique:        -itc-courier-bold-o-normal-- \n\
  691.     Courier-Oblique:        -itc-courier-medium-o-normal-- \n\
  692.     GillSans:            -monotype-gill-medium-r-normal-sans- \n\
  693.     GillSans-Bold:            -monotype-gill-bold-r-normal-sans- \n\
  694.     GillSans-BoldItalic:        -monotype-gill-bold-i-normal-sans- \n\
  695.     GillSans-Italic:        -monotype-gill-normal-i-normal-sans- \n\
  696.     Helvetica:            -linotype-helvetica-medium-r-normal-- \n\
  697.     Helvetica-Bold:            -linotype-helvetica-bold-r-normal-- \n\
  698.     Helvetica-BoldOblique:        -linotype-helvetica-bold-o-normal-- \n\
  699.     Helvetica-Narrow:        -linotype-helvetica-medium-r-narrow-- \n\
  700.     Helvetica-Narrow-Bold:        -linotype-helvetica-bold-r-narrow-- \n\
  701.     Helvetica-Narrow-BoldOblique:    -linotype-helvetica-bold-o-narrow-- \n\
  702.     Helvetica-Narrow-Oblique:    -linotype-helvetica-medium-o-narrow-- \n\
  703.     Helvetica-Oblique:        -linotype-helvetica-medium-o-normal-- \n\
  704.     LucidaBright:            -b&h-lucidabright-medium-r-normal-- \n\
  705.     LucidaBright-Demi:        -b&h-lucidabright-demibold-r-normal-- \n\
  706.     LucidaBright-DemiItalic:    -b&h-lucidabright-demibold-i-normal-- \n\
  707.     LucidaBright-Italic:        -b&h-lucidabright-medium-i-normal-- \n\
  708.     LucidaSans:            -b&h-lucida-medium-r-normal-sans- \n\
  709.     LucidaSans-Bold:        -b&h-lucida-bold-r-normal-sans- \n\
  710.     LucidaSans-BoldItalic:        -b&h-lucida-bold-i-normal-sans- \n\
  711.     LucidaSans-Italic:        -b&h-lucida-medium-i-normal-sans- \n\
  712.     LucidaSans-Typewriter:        -b&h-lucidatypewriter-medium-r-normal-sans- \n\
  713.     LucidaSans-TypewriterBold:    -b&h-lucidatypewriter-bold-r-normal-sans- \n\
  714.     NewCenturySchlbk-BoldItalic:    -linotype-new century schoolbook-bold-i-normal-- \n\
  715.     NewCenturySchlbk-Bold:        -linotype-new century schoolbook-bold-r-normal-- \n\
  716.     NewCenturySchlbk-Italic:    -linotype-new century schoolbook-medium-i-normal-- \n\
  717.     NewCenturySchlbk-Roman:        -linotype-new century schoolbook-medium-r-normal-- \n\
  718.     Palatino-Bold:            -linotype-palatino-bold-r-normal-- \n\
  719.     Palatino-BoldItalic:        -linotype-palatino-bold-i-normal-- \n\
  720.     Palatino-Italic:        -linotype-palatino-medium-i-normal-- \n\
  721.     Palatino-Roman:            -linotype-palatino-medium-r-normal-- \n\
  722.     Rockwell:            -monotype-rockwell-medium-r-normal-- \n\
  723.     Rockwell-Bold:            -monotype-rockwell-bold-r-normal-- \n\
  724.     Rockwell-BoldItalic:        -monotype-rockwell-bold-i-normal-- \n\
  725.     Rockwell-Italic:        -monotype-rockwell-medium-i-normal-- \n\
  726.     Times-Bold:            -linotype-times-bold-r-normal-- \n\
  727.     Times-BoldItalic:        -linotype-times-bold-i-normal-- \n\
  728.     Times-Italic:            -linotype-times-medium-i-normal-- \n\
  729.     Times-Roman:            -linotype-times-medium-r-normal-- \n\
  730.     Utopia-Bold:            -adobe-utopia-bold-r-normal-- \n\
  731.     Utopia-BoldItalic:        -adobe-utopia-bold-i-normal-- \n\
  732.     Utopia-Italic:            -adobe-utopia-regular-i-normal-- \n\
  733.     Utopia-Regular:            -adobe-utopia-regular-r-normal-- \n\
  734.     ZapfChancery-MediumItalic:    -itc-zapfchancery-medium-i-normal-- \n
  735. Ghostscript.dingbatFonts: \
  736.     ZapfDingbats:            -itc-zapfdingbats-medium-r-normal--
  737. Ghostscript.symbolFonts: \
  738.     Symbol:                --symbol-medium-r-normal--
  739.  
  740. Users who switch regularly between different X servers may wish to use the
  741. '*' wild card in place of the foundry name (itc, monotype, linotype, b&h,
  742. or adobe); users who do not switch X servers should leave the explicit
  743. foundry in the name, since it speeds up font accessing.
  744.  
  745. To set these resources, put them in a file (such as ~/.Xdefaults) in the
  746. following form:
  747.  
  748. Ghostscript*geometry:    -0+0
  749. Ghostscript*xResolution: 72
  750. Ghostscript*yResolution: 72
  751.  
  752. Then load the defaults into the X server:
  753.  
  754. % xrdb -merge ~/.Xdefaults
  755.  
  756. Ghostscript will take advantage of the "HP XLFD Enhancements," if
  757. available, to use native X11 fonts for fonts that are anamorphically
  758. scaled, rotated, or mirrored.  If the user has installed these changes to
  759. their X or font server, they will automatically be used when appropriate.
  760.  
  761. SCO Unix
  762. --------
  763.  
  764. Because of bugs in the SCO Unix kernel, Ghostscript will not work if you
  765. select direct screen output (gdevsco.c) and also allow it to write messages
  766. on the console.  If you are using direct screen output, redirect
  767. Ghostscript's terminal output to a file.
  768.  
  769. Amiga
  770. -----
  771.  
  772. Ghostscript supports three Amiga specific devices (but see below for ILBM):
  773.     amiga           Amiga Workbench window
  774.     amiga_custom    Amiga custom screenmodes
  775.     amiga_printer   Amiga printer.device
  776.  
  777. The device 'amiga' opens an Intuition window on the Workbench screen to
  778. display the image. Its usage should be pretty obvious.
  779.  
  780. The device 'amiga_custom' opens a Customscreen to display the image. This 
  781. allows any Display Mode available in the screenmode preferences to be used
  782. with Ghostscript too. There are two ways to specify the desired Display Mode:
  783.  
  784. - Provide it via the command line switch -sDisplayMode. It will accept both,
  785. the Name or the ModeID of a Display Mode as in these examples (case is 
  786. ignored, spaces have to be enclosed in double-quotes and a ModeID has to be 
  787. prefixed by 0x):
  788.     -sDEVICE=amiga_custom -sDisplayMode=MULTISCAN:Productivity
  789.     -sDEVICE=amiga_custom "-sDisplayMode=PAL:Low Res Laced"
  790.     -sDEVICE=amiga_custom -sDisplayMode=0x21000
  791.  
  792. - Ommit the command line switch. On first invocation a screenmode requester
  793. allows the selection of a Display Mode. The selection will be stored in the 
  794. local environment variable GS_DISPLAYMODE and used on any subsequent 
  795. invocation of Ghostscript without the command line switch. This variable can 
  796. be reset to make the requester reappear the next time. It can be made 
  797. permanent too, if stored in the global environment ENVARC:; wildcards in
  798. the name are supported (i.e. #?Laced#? will use the first interlaced Display 
  799. Mode). However, if permanent custom settings are desired, using aliases is 
  800. probably more flexible (see below).
  801.  
  802. It is convenient to use aliases for ones personal custom settings, for
  803. example: alias gshigh gs -sDEVICE=amiga_custom "-sDisplayMode=NTSC:High Res"
  804. makes any future call just 'gshigh File.ps'.
  805.  
  806. The device 'amiga_printer' is a convenient alternative for the printer devices
  807. provided by Ghostscript itself. It facilitates standard Amiga printing via the
  808. Workbench printer drivers and respects most settings in the graphics 
  809. preferences as described in the Workbench documentation. For example:
  810. to get a full sized image one should set dimensions to either 'ignore' or 
  811. 'max. boundaries'; 'absolute' will scale the image as appropriate (only if 
  812. the selected resolution of the printer is 1:1, else the output will be scaled 
  813. wrong owing to a bug in the printer.device).
  814. Although 'amiga_printer' tries to deal with non-printable margins and similar
  815. things, the implementations of the printer.device and most printer drivers 
  816. have severe limitations concerning these tasks (however, some third-party 
  817. printer drivers, such as the ones provided by Canon are doing a much better 
  818. job). Therefore it is recommended to use the more precise Ghostscript printer 
  819. devices, if accuracy matters.
  820.  
  821. All three devices are supporting -g and -r as described in 'Switches' below. 
  822. Although their is generally no need for them there are some special cases
  823. where they may be useful. For example: the usage of -r is very convenient to 
  824. preview an image within the boundaries of the monitor without fiddling with
  825. the more powerful, yet more complex postscript scaling commands.
  826.  
  827. Ghostscript currently has only limited support for IFF ILBM files:
  828.     amiga_ilbm    IFF ILBM file format
  829.  
  830. The device 'amiga_ilbm' works like any other Ghostscript raster file or 
  831. printer device (i.e. pbm), see 'Choosing the output device' above on how 
  832. to specify an output file.
  833. It supports dithered grayscale only and is not portable to other platforms 
  834. because it uses iffparse.library. A portable implementation with color 
  835. support is currently under development.
  836.  
  837. ********
  838. ******** Switches
  839. ********
  840.  
  841. Unless otherwise noted, these apply to all platforms.
  842.  
  843. Normal switches
  844. ---------------
  845.  
  846.     Input control
  847.     -------------
  848.  
  849.     @filename
  850.         Causes Ghostscript to read filename and treat its
  851.         contents the same as the command line.  (This is
  852.         intended primarily for getting around MS-DOS's
  853.         128-character limit on the length of a command line.)
  854.         Switches or file names in the file may be separated by
  855.         any amount of white space (space, tab, line break);
  856.         there is no limit on the size of the file.
  857.  
  858.     -- filename arg1 ...
  859.     -+ filename arg1 ...
  860.         Takes the next argument as a file name as usual, but takes
  861.         all remaining arguments (even if they have the syntactic
  862.         form of switches) and defines the name ARGUMENTS in
  863.         userdict (not systemdict) as an array of those strings,
  864.         *before* running the file.  When Ghostscript finishes
  865.         executing the file, it exits back to the shell.
  866.  
  867.     -@ filename arg1 ...
  868.         Does the same thing as -- and -+, but expands @filename
  869.         arguments.
  870.  
  871.     -
  872.         This is not really a switch.  It indicates to Ghostscript
  873.         that the standard input is coming from a file or a pipe.
  874.         Ghostscript reads from stdin until reaching end-of-file,
  875.         executing it like any other file, and then continues
  876.         processing the command line.  At the end of the command
  877.         line, Ghostscript exits rather than going into its
  878.         interactive mode.  NOTE: this switch works only for
  879.         PostScript, not for PDF.
  880.  
  881.     -c tokens ...
  882.         Interprets arguments, up to the next argument that begins
  883.         with - followed by a non-digit or with @, as PostScript
  884.         code.  For example, if the file quit.ps contains just
  885.         the word `quit', the following are equivalent:
  886.             quit.ps
  887.         and
  888.             -c quit
  889.         Each argument must be exactly one token, as defined by
  890.         the `token' operator.
  891.  
  892.     -ffilename
  893.         Execute the given file, even if its name begins with a -
  894.         or an @.  -f alone does nothing, but it provides a
  895.         convenient way to terminate the list of tokens for the -c
  896.         switch.
  897.  
  898.     File searching
  899.     --------------
  900.  
  901.     Note that by "library files" we mean all the files identified as
  902.     using the search rule under "File searching" above: Ghostscript's
  903.     own initialization files, fonts, and files named on the command
  904.     line.
  905.  
  906.     -Idirectories
  907.         Adds the designated list of directories at the head of the
  908.         search path for library files.
  909.  
  910.     -P
  911.         Makes Ghostscript look first in the current directory for
  912.         library files.  This is currently the default.
  913.     -P-
  914.         Makes Ghostscript *not* look first in the current directory
  915.         for library files (unless, of course, the first explicitly
  916.         supplied directory is `.').
  917.  
  918.     Parameter setting
  919.     -----------------
  920.  
  921.     -Dname=token
  922.     -dname=token
  923.         Define a name in systemdict with the given definition.
  924.         The token must be exactly one token (as defined by the
  925.         'token' operator) and must not contain any whitespace.
  926.         If the token is a non-literal name, it must be true,
  927.         false, or null.
  928.  
  929.     -Dname
  930.     -dname
  931.         Define a name in systemdict with value=true.
  932.  
  933.     -Sname=string
  934.     -sname=string
  935.         Define a name in systemdict with a given string as value.
  936.         This is different from -d.  For example,
  937.             -dname=35
  938.         is equivalent to the program fragment
  939.             /name 35 def
  940.         whereas
  941.             -sname=35
  942.         is equivalent to
  943.             /name (35) def
  944.  
  945.     -uname
  946.         Un-define a name, cancelling -d or -s.
  947.  
  948.     -gnumber1xnumber2
  949.         Equivalent to -dDEVICEWIDTH=number1 and
  950.         -dDEVICEHEIGHT=number2, specifying the device width and
  951.         height in pixels.  This is for the benefit of devices (such
  952.         as X11 windows and VESA displays) that require (or allow)
  953.         width and height to be specified.  Note that this causes
  954.         documents of other sizes to be clipped, not scaled:
  955.         see -dFIXEDMEDIA below.
  956.  
  957.     -rnumber
  958.     -rnumber1xnumber2
  959.         Equivalent to -dDEVICEXRESOLUTION=number1 and
  960.         -dDEVICEYRESOLUTION=number2, specifying the device
  961.         horizontal and vertical resolution in pixels per inch.  This
  962.         is for the benefit of devices (such as printers) that
  963.         support multiple X and Y resolutions.
  964.  
  965.     Miscellaneous
  966.     -------------
  967.  
  968.     -q
  969.         Quiet startup -- suppress normal startup messages,
  970.         and also do the equivalent of -dQUIET.
  971.  
  972. Note that gs_init.ps makes systemdict read-only, so the values of names
  973. defined with -D/d/S/s cannot be changed (although, of course, they can be
  974. superseded by definitions in userdict or other dictionaries.)
  975.  
  976. Special names
  977. -------------
  978.  
  979. -dBATCH
  980.     causes Ghostscript to exit after processing all files named on the
  981. command line, rather than going into an interactive loop reading PostScript
  982. commands.  Equivalent to putting -c quit at the end of the command line.
  983.  
  984. -dCOLORSCREEN
  985. -dCOLORSCREEN=0
  986. -dCOLORSCREEN=false
  987.     On high-resolution devices (at least 150 dpi resolution, or
  988. -dDITHERPPI specified), -dCOLORSCREEN forces the use of separate halftone
  989. screens with different angles for C/M/Y/K or R/G/B if halftones are needed
  990. (this produces the best-quality output); -dCOLORSCREEN=0 uses separate
  991. screens with the same frequency and angle; -dCOLORSCREEN=false forces the
  992. use of a single binary screen.  If COLORSCREEN is not specified, the default
  993. is to use separate screens with different angles if the device has fewer
  994. than 5 bits per color, and a single binary screen (which will never actually
  995. be used under normal circumstances) on all other devices.
  996.  
  997. -dDELAYBIND
  998.     causes 'bind' to remember all its invocations, but not actually
  999. execute them until the .bindnow procedure is called.  Useful only for
  1000. certain specialized packages like pstotext that redefine operators.
  1001.  
  1002. -dDISKFONTS
  1003.     causes individual character outlines to be loaded from the disk the
  1004. first time they are encountered.  (Normally Ghostscript loads all the
  1005. character outlines when it loads a font.)  This may allow loading more
  1006. fonts into RAM, at the expense of slower rendering.  DISKFONTS is only
  1007. effective if the diskfont feature was selected in the executable; otherwise
  1008. it is ignored.
  1009.  
  1010. -dDITHERPPI=lpi
  1011.     forces all devices to be considered high-resolution, and forces use
  1012. of a halftone screen or screens with lpi lines per inch, disregarding the
  1013. actual device resolution.  Reasonable values for lpi are N/5 to N/20, where
  1014. N is the resolution in dots per inch.
  1015.  
  1016. -dFIXEDMEDIA
  1017.     causes the media size to be fixed after initialization, and causes
  1018. pages of other sizes or orientations to be clipped.  This may be useful when
  1019. printing documents on a printer that can handle their requested paper size
  1020. but whose default is some other size.  Note that -g automatically sets
  1021. -dFIXEDMEDIA, but -sPAPERSIZE= does not.
  1022.  
  1023. -dFIXEDRESOLUTION
  1024.     causes the media resolution to be fixed similarly.  -r automatically
  1025. sets -dFIXEDRESOLUTION.
  1026.  
  1027. -dLOCALFONTS
  1028.     causes Type 1 fonts to be loaded into the current VM, which is
  1029. normally local VM, instead of always being loaded into global VM.  Only
  1030. useful for compatibility with Adobe printers for loading some obsolete
  1031. fonts.
  1032.  
  1033. -dNOBIND
  1034.     disables the 'bind' operator.  Only useful for debugging.
  1035.  
  1036. -dNOCACHE
  1037.     disables character caching.  Only useful for debugging.
  1038.  
  1039. -dNOCIE
  1040.     substitutes DeviceGray and DeviceRGB for CIEBasedA and CIEBasedABC
  1041. color spaces respectively.  Only useful on very slow systems where color
  1042. accuracy is less important.
  1043.  
  1044. -dNODISPLAY
  1045.     initializes Ghostscript with a null device (a device that discards
  1046. the output image) rather than the default device or the device selected with
  1047. -sDEVICE=.  This is usually only useful when running PostScript code whose
  1048. purpose is to compute something rather than produce an output image.
  1049.  
  1050. -dNOFONTMAP
  1051.     suppresses the normal loading of the Fontmap file.  This may be
  1052. useful in environments without a file system.
  1053.  
  1054. -dNOFONTPATH
  1055.     suppresses consultation of GS_FONTPATH.  This may be useful for
  1056. debugging.
  1057.  
  1058. -dNOGC
  1059.     suppresses the initial automatic enabling of the garbage collector
  1060. in Level 2 systems.  (The vmreclaim operator is not disabled.)  Only useful
  1061. for debugging.
  1062.  
  1063. -dNOPAUSE
  1064.     disables the prompt and pause at the end of each page.  Normally one
  1065. should use this (along with -dBATCH) when producing output on a printer or
  1066. to a file; it also may be desirable for applications where another program
  1067. is 'driving' Ghostscript.
  1068.  
  1069. -dNOPLATFONTS
  1070.     disables the use of fonts supplied by the underlying platform
  1071. (X Windows or Microsoft Windows).  This may be needed if the platform
  1072. fonts look undesirably different from the scalable fonts.
  1073.  
  1074. -dNOPROMPT
  1075.     disables only the prompt, but not the pause, at the end of each
  1076. page.  This may be useful on PC displays that get confused if a program
  1077. attempts to write text to the console while the display is in a graphics
  1078. mode.
  1079.  
  1080. -dORIENT1=false
  1081.     indicates that the file uses a value of 0 to indicate portrait
  1082. orientation to setpage[params] rather than the default orientation of 1.
  1083. This is needed for some files produced by badly designed applications that
  1084. 'know' that the output will be printed on certain roll-media printers.
  1085.  
  1086. -dQUIET
  1087.     suppresses routine information comments on stdout.  This is
  1088. currently necessary when redirecting device output to stdout.
  1089.  
  1090. -dSAFER
  1091.     disables the deletefile and renamefile operators, and the
  1092. ability to open files in any mode other than read-only.  This may be
  1093. desirable for spoolers or other sensitive environments.
  1094.  
  1095. -dSHORTERRORS
  1096.     makes certain error and information messages more Adobe-compatible.
  1097.  
  1098. -dWRITESYSTEMDICT
  1099.     leaves systemdict writable.  This is necessary when running
  1100. special utility programs such as font2c and pcharstr, which must bypass
  1101. normal PostScript access protection.
  1102.  
  1103. -sDEVICE=device
  1104.     selects an alternate initial output device, as described above.
  1105.  
  1106. -sFONTMAP=filename1;filename2;...
  1107.     specifies (an) alternate name(s) for the Fontmap file.  Note that
  1108. the names are separated by : on Unix systems, by ; on MS-DOS or MS Windows
  1109. systems, and by , on VMS systems, just as for search paths.
  1110.  
  1111. -sFONTPATH=dir1;dir2;...
  1112.     specifies a list of directories that will be scanned automatically
  1113. for fonts, overriding the GS_FONTPATH environment variable.
  1114.  
  1115. -sOutputFile=filename
  1116.     selects an alternate output file (or pipe) for the initial output
  1117. device, as described above.
  1118.  
  1119. -sSUBSTFONT=fontname
  1120.     causes the given font to be substituted for all unknown fonts,
  1121. instead of using the normal intelligent substitution algorithm.
  1122.  
  1123. Debugging switches
  1124. ------------------
  1125.  
  1126. The -Z switch only applies if the interpreter was built for a
  1127. debugging configuration (DEBUG=1 or -DDEBUG selected at compile
  1128. time).
  1129.  
  1130.     -A    Fill empty storage with a distinctive bit pattern
  1131.         for debugging.  Equivalent to -Z@.
  1132.     -A-    Turn off -A, equivalent to -Z-@.
  1133.  
  1134.     -E    Turn on tracing of error returns from operators.
  1135.         Equivalent to -Z#.
  1136.     -E-    Turn off -E, equivalent to -Z-#.
  1137.  
  1138.     -Mn    Force the interpreter's allocator to acquire additional
  1139.         memory in units of nK, rather than the default (currently
  1140.         20K on MS-DOS systems, 50K on Unix).  n is a positive
  1141.         decimal integer (not exceeding 63 on MS-DOS systems).
  1142.  
  1143.     -Nn    Allocate space for nK names, rather than the default
  1144.         (normally 64K).  n > 64 is only allowed if the interpreter
  1145.         was compiled with EXTEND_NAMES defined.
  1146.  
  1147.     -Zxxx    Turn on debugging printout.
  1148.     -Z-xxx    Turn off debugging printout.
  1149.         Each of the xxx characters selects an option.
  1150.         Case is significant.
  1151.             0 = garbage collector, minimal detail
  1152.             1 = type 1 & type 42 font interpreter
  1153.             2 = curve subdivider/rasterizer
  1154.               3 = curve subdivider/rasterizer, detail
  1155.             4 = garbage collector (strings)
  1156.               5 = garbage collector (strings, detail)
  1157.             6 = garbage collector (chunks, roots)
  1158.               7 = garbage collector (objects)
  1159.               8 = garbage collector (refs)
  1160.               9 = garbage collector (pointers)
  1161.             a = allocator (large blocks only)
  1162.               A = allocator (all calls)
  1163.             b = bitmap image processor
  1164.               B = bitmap images, detail
  1165.             c = color/halftone mapper
  1166.             d = dictionary put/undef
  1167.               D = dictionary lookups
  1168.             e = external (OS-related) calls
  1169.             f = fill algorithm (summary)
  1170.               F = fill algorithm (detail)
  1171.             g = gsave/grestore[all]
  1172.             h = halftone renderer
  1173.               H = halftones, every pixel
  1174.             i = interpreter, just names
  1175.               I = interpreter, everything
  1176.             j = (Japanese) composite fonts
  1177.             k = character cache & xfonts
  1178.               K = character cache, every access
  1179.             l = command lists, bands
  1180.               L = command lists, everything
  1181.             m = makefont and font cache
  1182.             n = name lookup (new names only)
  1183.             o = outliner (stroke)
  1184.               O = stroke detail
  1185.             p = band list paths
  1186.               P = all paths
  1187.             q = clipping
  1188.             r = arc renderer
  1189.             s = streams
  1190.               S = scanner
  1191.             t = tiling algorithm
  1192.             u = undo saver (for save/restore), finalization
  1193.               U = undo saver, more detail
  1194.             v = rectangle fill
  1195.               V = device-level output
  1196.             w = compression encoder/decoder
  1197.             x = transformations
  1198.             y = Type 1 hints
  1199.               Y = Type 1 hints, every access
  1200.             z = trapezoid fill
  1201.             # = operator error returns
  1202.             % = externally processed comments
  1203.             * = image parameters
  1204.             : = command list, summary only
  1205.             ~ = math functions
  1206.         The following switches select debugging options other than
  1207.         printout.
  1208.             $ = set unused parts of object references to
  1209.                 identifiable garbage values
  1210.             + = use minimum-size stack blocks
  1211.             , = don't use path-based banding
  1212.             . = use small-memory table sizes even on
  1213.                 large-memory machines
  1214.             ? = validate pointers before, during and after GC,
  1215.                 also before and after save and restore;
  1216.                 also make other allocator validity checks
  1217.             @ = fill newly allocated, garbage-collected, and
  1218.                 freed storage with a marker (a1, c1, and
  1219.                 f1 respectively)
  1220.  
  1221. ********
  1222. ******** Frequently Asked Questions
  1223. ********
  1224.  
  1225. Please consult our FAQ on the World-Wide Web at
  1226.     http://www.cs.wisc.edu/~ghost/gsfaq.html
  1227. or the text version at
  1228.     http://www.cs.wisc.edu/~ghost/gsfaq.txt
  1229.